package com.book.listener;


import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @author xuchangshuo
 * @date 2020/11/3 16:30
 */

@RabbitListener
public class TestListener {


    @Autowired
    private RabbitTemplate rabbitTemplate;

    public void send(){
        rabbitTemplate.convertAndSend("","hello",false);
    }

}
